export const DEFAULT_ICON_LIST = [
  '/icon/default.svg',
];

export function pickDefaultIconForKey(key?: string): string {
  const list = DEFAULT_ICON_LIST;
  if (!key) {
    return list[Math.floor(Math.random() * list.length)];
  }
  // Simple hash-based deterministic pick so same name gets same icon
  let hash = 0;
  for (let i = 0; i < key.length; i++) {
    hash = (hash << 5) - hash + key.charCodeAt(i);
    hash |= 0; // Convert to 32-bit integer
  }
  const index = Math.abs(hash) % list.length;
  return list[index];
}